#include "tcp_server.hpp"
#include <memory>

void usage()
{
    std::cout << "\nUsage " << "port" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        usage();
        exit(1);
    }

    uint16_t server_port = atoi(argv[1]);//服务端端口
    std::unique_ptr<TcpServer> tse(new TcpServer(server_port));//创建服务端对象
    tse->initServer();
    tse->start();
    
    return 0;
}